Computer networks rely on switches to forward frames between various nodes in a network. As used herein, a frame refers to any discrete bundle of data switched through a network, such as an Ethernet packet or ATM frame. A switch typically receives a frame as input at an ingress port and provides the frame as output to an egress port associated with a destination to which the frame is addressed. The output frame is not necessarily the same as the input frame. For example, the switch may modify the header of the frame or encapsulate the frame for purposes of tunneling. The frame may need to be replicated and sent to multiple destinations with different headers. Typically, the replication process requires generating an identical copy of the frame for each destination, which can be inefficient and inflexible in hardware. Also, it may be desirable for a frame, such as a control frame, to be generated without a corresponding input frame, a capability not provided by current systems. There is a need for a more efficient and flexible way to generate and replicate frames in a switch.